package com.droolsdemo.rule;

public class RuleExecute {
    public static String activityRule() {
        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append("package rule;\n");
        stringBuffer.append("import com.droolsdemo.pojo.Person;\n");
        stringBuffer.append("rule \"person_1\"\n");
        stringBuffer.append("no-loop true \n");
        stringBuffer.append("salience 10 \n");
        stringBuffer.append("when\n");
        stringBuffer.append("$p:Person(name == \"张三\", age == \"22\")\n");
        stringBuffer.append("then\n");
        stringBuffer.append("modify($p) {setName(\"张小三\")} \n");
        stringBuffer.append("end \n");
        return stringBuffer.toString();
    }
}
